package com.hfzy.ihk.web.aliyuncall.constant;

import com.hfzy.ihk.common.util.string.StringUtil;

/**
 * Created by Administrator on 2016/6/14.
 *
 * @author wws
 *
 * redis key 前缀
 */
public class RedisKey {

    //=======================key前缀===============================



    /**callHistory对象 ：<前缀+":"+sessionId:<field,value>>*/

    public static String CALL_HISTORY_RPIX = "aliyuncall:callHistory:";

    /**************用于呼入**************start*********************************/
    /**记录最后一个通过某主显号码打给客户号码的经纪人ID等信息：
     * <newCallHistoryLastByShowNum：主显号码,<客户电话：userId，经纪人ID>>
     * <newCallHistoryLastByShowNum：主显号码,<客户电话：dataId，置业云呼记录id>>
     * <newCallHistoryLastByShowNum：主显号码,<客户电话：popupWindowId，电弹屏信息json>>
     * 改变为====>>
     * <LastCallInfo：主显号码：客户电话，<userId,经纪人ID>>
     * <LastCallInfo：主显号码：客户电话，<dataId,置业云呼记录id>>
     * <LastCallInfo：主显号码：客户电话，<popupWindowId,电弹屏信息json>>
     */
    public static String CALL_HISTORY_LAST_BY_SHOW_NUM_RPIX = "aliyuncall:callHistoryLastByShowNum:";

    public static String LAST_CALL_INFO_RPIX = "aliyuncall:LastCallInfo:";

    public static String LAST_CALL_INFO_USER_ID = "aliyuncall:userId";

    public static String LAST_CALL_INFO_CITY_ID = "aliyuncall:cityId";

    public static String LAST_CALL_INFO_DATA_ID = "aliyuncall:dataId";

    public static String POPUP_WINDOW_ID = "aliyuncall:popupWindowId";//保存来电弹屏信息
    /****************************end*********************************/

    /** 经纪是否占线 如果先打客户，则客户接听开始就算经纪占线 <userBuzy, <经纪人ID, true/false>> **/
    public static String USER_BUSY = "aliyuncall:userBusy";

    public static String PUSH_TO_ES_FAILED_HISTORY = "aliyuncall:pushToESFailedHistory";

    public static String PUSH_RECORD_URL_TO_ES_FAILED = "aliyuncall:pushRecordUrlToESFailed:";

    /**
     * 推送数据到保利失败的set
     */
    public static String PUSH_RECORD_TO_BL_FAILED_SET = "aliyuncall:pushRecordToBlFailedSet";

    /*
     * 推送录音链接数据到保利失败的set
     */
    public static String PUSH_URL_TO_BL_FAILED_SET = "aliyuncall:pushUrlToBlFailedSet";

    /**
     * 用来保存白天接受到的阿里云的URL，用于晚上pao job用---下载录音到本地
     */
    public static String ALIYUN_RECORD_URL_SET = "aliyuncall:aliyunRcordUrlSet";


    /**投诉我们的客户号码，这类号码不允许再呼出
     * Set
     * 直接设置到redis中
     * */
    public static String BAD_CUSTOMER_PHONE = "aliyuncall:badCustomerPhone";


    public static String createLastCallInfo(String showNum, String customerPhone){
        return StringUtil.strConnect(LAST_CALL_INFO_RPIX, showNum,":",customerPhone);
    }
    //taobao
    public static String DOWN_RECORD_FILE_FAIL_SET = "aliyuncall:downRecordFileFailSet";

    public static String INTERRUPT_FAIL = "aliyuncall:interruptFail";


    public static String CALL_IN = "aliyuncall:callIn:";

}
